package view;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Polygon;

import model.HedgeHog;

public class HedgehogView implements Paintable {
	
	private HedgeHog hedgehog;
	
	public HedgehogView(HedgeHog ho){
		hedgehog=ho;
	}
	
	
	@Override
	public void paint(Graphics g) {
		int loc_x=(int)hedgehog.get_x();
		int loc_y=(int)hedgehog.get_y();
		
		//kirajzol egy sarga H betut
		g.setColor(Color.MAGENTA);
		Polygon P= new Polygon();
		P.addPoint(loc_x-5, loc_y-5);
		P.addPoint(loc_x+5, loc_y-5);
		P.addPoint(loc_x+5, loc_y+5);
		P.addPoint(loc_x-5, loc_y+5);
		g.fillPolygon(P);

	}

	@Override
	public boolean alive() {
		return true;
		
	}
}
